<?php
namespace Admin\Controller;


class IndexController extends BaseController {
    /*
     * 后台首页
     * */
    public function index(){
        //获取程序目录
        $data['run_dir'] = $_SERVER['DOCUMENT_ROOT'];
        $data['php_version'] = PHP_VERSION;
        //获取磁盘用量 单位MB
        $data['disk_free'] = round(disk_free_space($data['run_dir'])/(1024*1024),2);
        //磁盘总空间 单位MB
        $data['disk_total'] = round(disk_total_space($data['run_dir'])/(1024*1024),2);
        $this->assign('info',$data);
        $this->display();
    }
}